/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:49 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class Cauhoi_PhuonganEntity
    {
        public Cauhoi_PhuonganEntity()
        {
			m_fk_icauhoiid=0;
			m_fk_iphuonganid=0;
        }
		private Int64 m_fk_icauhoiid;
		public Int64 FK_iCauhoiID
		{
			get { return m_fk_icauhoiid ; }
			set { m_fk_icauhoiid = value; }
		}
		private Int64 m_fk_iphuonganid;
		public Int64 FK_iPhuonganID
		{
			get { return m_fk_iphuonganid ; }
			set { m_fk_iphuonganid = value; }
		}

        #region Comparison
        public static List<Cauhoi_PhuonganEntity> Sort(List<Cauhoi_PhuonganEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(Cauhoi_PhuonganEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<Cauhoi_PhuonganEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<Cauhoi_PhuonganEntity> COMPARISON_FK_iCauhoiID
		{
			get
			{
				return delegate(Cauhoi_PhuonganEntity entity,Cauhoi_PhuonganEntity other)
				{
					return entity.FK_iCauhoiID.CompareTo(other.FK_iCauhoiID);
				};
			}
		}
		public static Comparison<Cauhoi_PhuonganEntity> COMPARISON_FK_iPhuonganID
		{
			get
			{
				return delegate(Cauhoi_PhuonganEntity entity,Cauhoi_PhuonganEntity other)
				{
					return entity.FK_iPhuonganID.CompareTo(other.FK_iPhuonganID);
				};
			}
		}
        #endregion
    }
}
